package fr.umlv.ig.event;

import fr.umlv.ig.model.Station;

/**
 * Represents event concerned by a Station.
 * @author jenseric  
 * @author william
 *
 */
@SuppressWarnings("serial")
public class StationEvent extends EventObjectWithType {
	
	/**
	 * event : station is opened
	 */
	public final static int STATION_OPENED = 1;
	
	/**
	 * event : station is closed
	 */
	public final static int STATION_CLOSED = 2;
	
	/**
	 * event : station is created
	 */
	public final static int STATION_CREATE = 3;
	
	/**
	 * event : station have add next station 
	 */
	public final static int STATION_ADDNEXT = 4;
	
	/**
	 * event : station is selected
	 */
	public static final int STATION_SELECTED = 5;
	
	/**
	 * event : station is unselected
	 */
	public static final int STATION_UNSELECTED = 6;
	
	/**
	 * event : station have change waiting time
	 */
	public static final int CHANGED_WAITING = 7;
	
	/**
	 * event : station have change nextWaiting time
	 */
	public static final int CHNAGED_NEXT_WAITING = 8;

	/**
	 * Initializes a StationEvent
	 * @param station the station concerned by the event.
	 * @param eventType the type of the event.
	 */
	public StationEvent(Station station, int eventType) {
		super(station, eventType);
		if(eventType!=STATION_OPENED 
				&& eventType!=STATION_CLOSED 
				&& eventType != STATION_CREATE 
				&& eventType != STATION_ADDNEXT
				&& eventType != STATION_SELECTED 
				&& eventType != STATION_UNSELECTED
				&& eventType != CHANGED_WAITING
				&& eventType != CHNAGED_NEXT_WAITING) {
			throw new IllegalArgumentException("Bad StationEvent type: "+eventType);
		}
	}


	
	
	
}
